home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  4.9 KB  |  152 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        QDOffscreen.h
  3.  
  4.      Contains:    QuickDraw Offscreen GWorld Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __QDOFFSCREEN__
  21. #define __QDOFFSCREEN__
  22.  
  23.  
  24. #ifndef __ERRORS__
  25. #include <Errors.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <Types.h>                                            */
  33. /*    #include <MixedMode.h>                                        */
  34. /*    #include <QuickdrawText.h>                                    */
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. #if PRAGMA_ALIGN_SUPPORTED
  41. #pragma options align=mac68k
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT_SUPPORTED
  45. #pragma import on
  46. #endif
  47.  
  48.  
  49. enum {
  50.     pixPurgeBit                    = 0,
  51.     noNewDeviceBit                = 1,
  52.     useTempMemBit                = 2,
  53.     keepLocalBit                = 3,
  54.     pixelsPurgeableBit            = 6,
  55.     pixelsLockedBit                = 7,
  56.     mapPixBit                    = 16,
  57.     newDepthBit                    = 17,
  58.     alignPixBit                    = 18,
  59.     newRowBytesBit                = 19,
  60.     reallocPixBit                = 20,
  61.     clipPixBit                    = 28,
  62.     stretchPixBit                = 29,
  63.     ditherPixBit                = 30,
  64.     gwFlagErrBit                = 31
  65. };
  66.  
  67. enum {
  68.     pixPurge                    = 1L << pixPurgeBit,
  69.     noNewDevice                    = 1L << noNewDeviceBit,
  70.     useTempMem                    = 1L << useTempMemBit,
  71.     keepLocal                    = 1L << keepLocalBit,
  72.     pixelsPurgeable                = 1L << pixelsPurgeableBit,
  73.     pixelsLocked                = 1L << pixelsLockedBit,
  74.     mapPix                        = 1L << mapPixBit,
  75.     newDepth                    = 1L << newDepthBit,
  76.     alignPix                    = 1L << alignPixBit,
  77.     newRowBytes                    = 1L << newRowBytesBit,
  78.     reallocPix                    = 1L << reallocPixBit,
  79.     clipPix                        = 1L << clipPixBit,
  80.     stretchPix                    = 1L << stretchPixBit,
  81.     ditherPix                    = 1L << ditherPixBit,
  82.     gwFlagErr                    = 1L << gwFlagErrBit
  83. };
  84.  
  85. typedef unsigned long GWorldFlags;
  86.  
  87. /* Type definition of a GWorldPtr */
  88. typedef CGrafPtr GWorldPtr;
  89.  
  90. extern pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld, short PixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  91.  FOURWORDINLINE(0x203C, 0x0016, 0x0000, 0xAB1D);
  92. extern pascal Boolean LockPixels(PixMapHandle pm)
  93.  FOURWORDINLINE(0x203C, 0x0004, 0x0001, 0xAB1D);
  94. extern pascal void UnlockPixels(PixMapHandle pm)
  95.  FOURWORDINLINE(0x203C, 0x0004, 0x0002, 0xAB1D);
  96. extern pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld, short pixelDepth, const Rect *boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags)
  97.  FOURWORDINLINE(0x203C, 0x0016, 0x0003, 0xAB1D);
  98. extern pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  99.  FOURWORDINLINE(0x203C, 0x0004, 0x0004, 0xAB1D);
  100. extern pascal void GetGWorld(CGrafPtr *port, GDHandle *gdh)
  101.  FOURWORDINLINE(0x203C, 0x0008, 0x0005, 0xAB1D);
  102. extern pascal void SetGWorld(CGrafPtr port, GDHandle gdh)
  103.  FOURWORDINLINE(0x203C, 0x0008, 0x0006, 0xAB1D);
  104. extern pascal void CTabChanged(CTabHandle ctab)
  105.  FOURWORDINLINE(0x203C, 0x0004, 0x0007, 0xAB1D);
  106. extern pascal void PixPatChanged(PixPatHandle ppat)
  107.  FOURWORDINLINE(0x203C, 0x0004, 0x0008, 0xAB1D);
  108. extern pascal void PortChanged(GrafPtr port)
  109.  FOURWORDINLINE(0x203C, 0x0004, 0x0009, 0xAB1D);
  110. extern pascal void GDeviceChanged(GDHandle gdh)
  111.  FOURWORDINLINE(0x203C, 0x0004, 0x000A, 0xAB1D);
  112. extern pascal void AllowPurgePixels(PixMapHandle pm)
  113.  FOURWORDINLINE(0x203C, 0x0004, 0x000B, 0xAB1D);
  114. extern pascal void NoPurgePixels(PixMapHandle pm)
  115.  FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xAB1D);
  116. extern pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  117.  FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xAB1D);
  118. extern pascal void SetPixelsState(PixMapHandle pm, GWorldFlags state)
  119.  FOURWORDINLINE(0x203C, 0x0008, 0x000E, 0xAB1D);
  120. extern pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  121.  FOURWORDINLINE(0x203C, 0x0004, 0x000F, 0xAB1D);
  122. extern pascal QDErr NewScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  123.  FOURWORDINLINE(0x203C, 0x000E, 0x0010, 0xAB1D);
  124. extern pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  125.  FOURWORDINLINE(0x203C, 0x0004, 0x0011, 0xAB1D);
  126. extern pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  127.  FOURWORDINLINE(0x203C, 0x0004, 0x0012, 0xAB1D);
  128. extern pascal Boolean QDDone(GrafPtr port)
  129.  FOURWORDINLINE(0x203C, 0x0004, 0x0013, 0xAB1D);
  130. extern pascal long OffscreenVersion(void)
  131.  TWOWORDINLINE(0x7014, 0xAB1D);
  132. extern pascal QDErr NewTempScreenBuffer(const Rect *globalRect, Boolean purgeable, GDHandle *gdh, PixMapHandle *offscreenPixMap)
  133.  FOURWORDINLINE(0x203C, 0x000E, 0x0015, 0xAB1D);
  134. extern pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  135.  FOURWORDINLINE(0x203C, 0x0004, 0x0016, 0xAB1D);
  136. extern pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  137.  FOURWORDINLINE(0x203C, 0x0004, 0x0017, 0xAB1D);
  138.  
  139. #if PRAGMA_IMPORT_SUPPORTED
  140. #pragma import off
  141. #endif
  142.  
  143. #if PRAGMA_ALIGN_SUPPORTED
  144. #pragma options align=reset
  145. #endif
  146.  
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150.  
  151. #endif /* __QDOFFSCREEN__ */
  152.